package com.huanletao.proxy.cglib;

import com.huanletao.proxy.AlterStaticMethodInterceptor;

/**
 * <p>
 * </p>
 * package: com.huanletao.proxy.cglib
 * description:
 * className: Logger
 * author:  踏雪无痕
 * copyright: Copyright (c) 2022/9/29 18:21
 * since: 1.0.0
 */
public class Logger implements AlterStaticMethodInterceptor, StaticMethodInterceptor, BeforeStaticMethodInterceptor {

    @Override
    public void before() {
        System.out.println("before = " + true);
    }

    @Override
    public void alter() {
        System.out.println("alter world ");
    }

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        Object proceed = invocation.proceed();
        Object[] arguments = invocation.getArguments();
        System.out.println("执行后，，，，，，，，，，，");
        return proceed;
    }
}
